#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

# Get directory this script is in
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
type=Release
# type=Debug

#requires python3.6 or higher
python3 $DIR/tools/ci_build/build.py --build_dir $DIR/build/Linux --config $type --parallel --skip_submodule_sync "$@"

# Install
mkdir -p install
mkdir -p install/lib
mkdir -p install/include

# Install lib
find $DIR/build/Linux/$type/ -name "*.o" | xargs ar cr install/lib/libmonolith_inference.a

# Install head file
cp -r $DIR/include/* install/include
cp -r $DIR/build/Linux/$type/onnxruntime_config.h install/include
